<!DOCTYPE html>
<html lang="en">

<%- include('common/head') %>

<body>
  <%- include('common/navbar') %>

  <div class="container">
    <ol class="breadcrumb">
      <li><a href="/">博客首页</a></li>
      <li class="active">分类列表</li>
    </ol>
    <h2>分类列表</h2>
    <div class="userInfoList">
      <table class="table table-striped">
        <tr>
          <th>ID</th>
          <th>分类名称</th>
          <th>操作</th>
        </tr>
        <% categories.forEach(function(category) { %>
        <tr style="font-size: 16px">
          <td class="categoryId" width="30%"><%= category.id %></td>
          <td width="30%"><%= category.name %></td>
          <td width="40%">
            <a href="/admin/category/edit?id=<%= category.id %>">修改</a>
            <a href="/admin/category/delete?id=<%= category.id %>">删除</a>
          </td>
        </tr>
        <% }) %>
      </table>
    </div>
    <%- include('common/page') %>
  </div>

  <script src="/js/jquery3.3.1.js"></script>
  <script src="/js/bootstrap.js"></script>
</body>
</html>
